#include<ctype.h>
#include<string.h>

#include"struct2.h"
#ifdef DEBUG2


#include<graphics.h>
#include<stdio.h>
#include<stdlib.h>
#include<conio.h>

#include"error2.h"
#include"tree2.h"
#include"debug2.h"


/* extern  variables */
extern  StrucMesh2  mesh2;
extern  StrucTree2  tree2;


void  initDebug2( void )
{
   int  gd=DETECT,gm,gerror;

   /* register a driver that was added into graphics.lib */
   /* For information on adding the driver, see the */
   /* BGIOBJ section of UTIL.DOC */
   gerror = registerbgidriver(EGAVGA_driver);

   /* report any registration errors */
   if (gerror < 0){
      printf("Graphics error: %s\n", grapherrormsg(gerror));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }

   /* initialize graphics and local variables */
/*   if( debug3.bool.clear )*/
     initgraph(&gd, &gm, "");

   /* read result of initialization */
   gerror = graphresult();
   if (gerror != grOk)  /* an error occurred */
   {
      printf("Graphics error: %s\n", grapherrormsg(gerror));
      printf("Press any key to halt:");
      getch();
      exit(1); /* terminate with an error code */
   }

/*   if( debug3.bool.clear ){
*/
      setfillstyle(SOLID_FILL,BLUE);
      setbkcolor(WHITE);
      cleardevice();
/*   }*/

/*   color.face   = BLUE;
   color.normal = RED;
*/
   return;
}/*initDebug2*/


#endif
